package com.sxjh.entity.param;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sxjh.entity.PageEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

@Data
@EqualsAndHashCode(callSuper = false)
public class PlannedOrderListParam extends PageEntity {

    /**
     * 计划单名称
     */
    @ExcelProperty(value = "计划单名称", order = 3)
    @ApiModelProperty(value = "计划单名称")
    @ColumnWidth(25)
    private String title;

    /**
     * 计划单号
     */
    @ExcelProperty(value = "计划单号", order = 4)
    @ApiModelProperty(value = "计划单号")
    @ColumnWidth(20)
    private String orderNo;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 派车单是否已生成
     */
    @ApiModelProperty(value = "派车单是否已生成")
    private Boolean isTrucking;

    /**
     * 物料id
     */
    @ApiModelProperty(value = "物料id")
    private Integer materialId;

    @ExcelProperty(value = "物料名称", order = 11)
    @ApiModelProperty(value = "物料名称")
    @ColumnWidth(20)
    private String materialName;

    /**
     * 是否关闭
     */
    @ApiModelProperty(value = "是否关闭:1,否;2,是")
    private Integer close = 1;

    /**
     * 开始日期
     */
    @ExcelProperty(value = "开始日期", order = 1)
    @ApiModelProperty(value = "开始日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(20)
    private String startDate;

    /**
     * 结束日期
     */
    @ExcelProperty(value = "结束日期", order = 2)
    @ApiModelProperty(value = "结束日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(20)
    private String endDate;

    /**
     * 装货地id
     */
    @ApiModelProperty(value = "装货地id")
    private Integer locationUpId;

    @ExcelProperty(value = "装货地名称", order = 5)
    @ApiModelProperty(value = "装货地名称")
    @ColumnWidth(25)
    private String locationUpName;

    /**
     * 卸货地id
     */
    @ApiModelProperty(value = "卸货地id")
    private Integer locationDownId;

    @ExcelProperty(value = "卸货地名称", order = 8)
    @ApiModelProperty(value = "卸货地名称")
    @ColumnWidth(25)
    private String locationDownName;

    @ExcelProperty(value = "id", index = 0)
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Integer createdBy;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间", order = 14)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(20)
    private LocalDateTime createdAt;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private Integer updatedBy;

    /**
     * 更新时间
     */
    @ExcelProperty(value = "更新时间", order = 15)
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(20)
    private LocalDateTime updatedAt;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "删除标记,1:否,-1:是")
    private Integer delFlag = 1;

    /**
     * 总计划量
     */
    @ExcelProperty(value = "总计划量/KG", order = 12)
    @ApiModelProperty(value = "总计划量")
    @ColumnWidth(15)
    private Double total;

    @ExcelProperty(value = "完成量/KG", order = 13)
    @ApiModelProperty(value = "完成量")
    @ColumnWidth(15)
    private Double completeTotal;

    @ApiModelProperty(value = "装货点所属工厂id")
    private Integer locationUpFactoryId;

    @ExcelProperty(value = "装货点所属工厂名称", order = 6)
    @ApiModelProperty(value = "装货点所属工厂名称")
    @ColumnWidth(25)
    private String locationUpFactoryName;

    @ApiModelProperty(value = "装货点所属车间id")
    private Integer locationUpWorkshopId;

    @ExcelProperty(value = "装货点所属车间名称", order = 7)
    @ApiModelProperty(value = "装货点所属车间名称")
    @ColumnWidth(25)
    private String locationUpWorkshopName;


    @ApiModelProperty(value = "卸货点所属工厂id")
    private Integer locationDownFactoryId;

    @ExcelProperty(value = "卸货点所属工厂名称", order = 9)
    @ApiModelProperty(value = "卸货点所属工厂名称")
    @ColumnWidth(25)
    private String locationDownFactoryName;

    @ApiModelProperty(value = "卸货点所属车间id")
    private Integer locationDownWorkshopId;

    @ExcelProperty(value = "卸货点所属车间名称", order = 10)
    @ApiModelProperty(value = "卸货点所属车间名称")
    @ColumnWidth(25)
    private String locationDownWorkshopName;

    private Set<Integer> upFactoryIdList;

    private List<Integer> statusList;

}
